Tootsville::Infinity-Send-Mail-Message

Function

Infinity-Send-Mail-Message names a function, with lambda list (D U R):

Send an in-game SMS message.

Lisp SEND-MAIL-MESSAGE = JSON sendMailMessage

Usage

{ ( to: "RECIPIENT" | toList: [ "RECIPIENT", ... ] ),
  [ subject: "" ],
  body: "BODY",
  [ uuid: UUID-STRING ] )

subject is optional, and should be omitted in 2.0. Non-empty subjects will return an error.

uuid is optional but recommended. It allows the client to track when a message has been sent.

See TOOTSVILLE SEND-SMS-MESSAGE for the underlying implementation.

Examples

{ to: "shader", subject: "", body: "Hello there!" }

{ toList: [ "catvlle", "pil" ], body: "Howdy" }

Input: subject (must be blank); to, the Toot name to whom to send the text; and body of the message.

Rather that to, the user can send toList with an object, the keys of which are ignored, the values of which are Toot names.

Changes from 1.2 to 2.0

Subjects are no longer supported. subject must be absent, null, or "".

uuid is a new option.

Message length is now measured in Unicode characters, not bytes.

Formerly Proprietary Extension

This command was formerly a proprietary extension for Tootsville.com and has now been re-created for the AGPL version of Romance.

200 OK

The “SMS” message was sent.

{ from: "sendMailMessage", status: true }
{ from: "sendMailMessage", status: true,
  uuid: "5047F44E-8B1D-4B8A-9EC6-4E1D6E1653AD" }

If the client supplied an UUID, it will be returned, allowing the client to identify which of potentially many SMS messages was sent.

Sending does not imply that the message was received or read by the destination user.

400 Bad Request

If an UUID was supplied with the request, the response will echo it.

subject must be absent, null, or ""

{ from: "sendMailMessage", status: false,
  error: "Subject is not allowed. Please leave subject blank." }

Exactly one of to or toList must be specified

{ from: "sendMailMessage", status: false,
  error: "Message has no destination.",
  uuid: "E6726651-703D-41FC-8484-E59EADEE7EA0" }

body may not be empty

413 Payload Too Large

body can be at most 1,024 (Unicode) characters (not bytes).

{ from: "sendMailMessage", status: false,
  error: "Message too long. Try a message with less than 1,000 characters." }

Formerly Proprietary Extension

This command was formerly a proprietary extension for Tootsville.com and has now been re-created for the AGPL version of Romance.

File

Defined in file src/infinity/tootsville-commands.lisp.